<template>
  <div class="child">
    <h1>子路由</h1>
    <button @click="goBack">返回</button>
  </div>
</template>

<script>
export default {
  methods: {
    goBack() {
      this.$router.go(-1)
    }
  }
}
</script>

<style scoped>
.child {
  height: 100%;
  background-color: lightpink;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

button {
  margin-top: 20px;
}
</style>
